package com.yunkuhui.www.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/mongodb")
public class MongodbController {

	@RequestMapping("/1")
	public List getMongoList() {
		System.out.println("1111111111111111111111111111111111");
		return null;
	}

	@RequestMapping("/2")
	public Long testGetCount() {
		System.out.println("2222222222222222222222222222222");
		return null;
	}

	@RequestMapping("/3")
	public Map testInsertData() {
		Map<String, String> data = new HashMap<>();
		data.put("aa", "aaaaaaaaaaaaaaaaaaaaaaaa");
		data.put("bb", "bbbbbbbbbbbbbbbbbbbbbb");
		data.put("cc", "cccccccccccccccccccccccc");
		data.put("dd", "dddddddddddddddddddd");
		return data;
	}
}
